package cloud.xlh.my_system.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/1/31 11:21
 * @ Description: SpringBoot优雅停机
 */
@Component
@Slf4j
public class AppListener implements CommandLineRunner, DisposableBean {

    @Override
    public void destroy() throws Exception {
        log.info("英雄迟暮......");
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("我要打倒最可怕的邪恶，难免要撕去虚假正义的薄薄糖衣。fighting!!!");
    }
}
